<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link href="images/skin.css" rel="stylesheet" type="text/css" />
<link href=images/fox.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" language="JavaScript">
/*$(function(){  //文档加载 
$(".tbody tr").hover( 
  function(){ 
    $(this).addClass("hover");    //鼠标经过添加hover样式 
  }, 
  function(){ 
    $(this).removeClass("hover");   //鼠标离开移除hover样式 
  }

); 
}); */
		function checkForm(){
		var geshi=/^[0-9]*[1-9][0-9]*$/;
		var count=document.getElementsByName("monthcount");
		for(var i=0;i<count.length;i++){
			

			if(!geshi.test(count[i].value)){
				
				alert("请输入大于0的正整数");
				return false;
			} else {
	
			}
			
		}
		return true;
	}

</script> 

<style type="text/css"> 
.hover{background-color:#CACACA;}  /*这里是鼠标经过时的颜色*/ 

</style>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}
-->
</style>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">采购管理</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
			<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="line_table">
		<tr>
		<td width="20">
		<img src="images/icon-login-seaver.gif" width="16" height="16" />
		</td>
		<td>
		当前位置：采购管理>>全年采购计划分解>>全年分解采购计划(decompositionProcurementPlanCreate.html)
		</td>

	</tr>
	</table>
	<form action="purchaseaction!updatemonth.action" method="post" name="monthactions" onsubmit="return checkForm()">
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="line_table">
		<tr>
		
		<td width="9%"><span class="left_bt2">全年计划总量</span></td>
		<td width="32%"><span id="totalcount" class="left_txt">${ycount}</span></td>
		<td width="59%">
		<input type="submit" class="Submit" value="保存" style="width:100px"/>
		<input type="button" class="Submit" value="返回" style="width:100px" onclick="javascript:history.back()"/>
		</td>
	</tr>
	</table>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="line_table">
		<thead class="thead">
	    <tr>
		<th width="10%">序号</th>
		<th width="19%">品牌</th>
		<th width="22%">车辆编码</th>
		<th width="15%">年份</th>	
		<th width="12%">月份</th>	
		<th width="22%">计划数量</th>	
		</tr>
		</thead>
		<tbody class="tbody">
		<s:iterator value="monthlist" var="month" status="st">
		 <tr>
		<td ><s:property value="#st.index+1"/></td>
		<td ><s:property value="#month.yearpurchase.modeldictionary.brand.brandName"/></td>
		<td ><s:property value="#month.yearpurchase.modeldictionary.modelCode"/></td>
		<td ><s:property value="#month.yearpurchase.year"/><input type="hidden" name="yearsid" value="<s:property value="#month.yearpurchase.yearPurchaseId"/>"/> </td>
		<td ><s:property value="#month.month"/><input type="hidden" name="monthid" value="<s:property value="#month.monthPurchaseId"/>"/></td>
		
		<td ><input name="monthcount" type="text" class="editbox4" value="0"/></td>	
		</tr>
		</s:iterator>
		</tbody>						
    </table>
    </form>
	</td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
页面说明：<br />
1.这里显示的是本年度某车型在12个月内的计划分解。<br />
2.对于输入的数字要做验证，输入的必须是数字。<br />
3.在某月每输入一个数字那么全年计划数量将会减少。<br />

</body>
</html>